<template>
  <div class="my-center">
    <div class="user-image">
      <img src alt />
    </div>
    <div class="user-name">3r5246356352</div>
    <div class="my-list">
      <div class="list-item">
        <i class="iconfont makerqianqianqian my-money"></i>
        <span>我的优惠券</span>
        <i class="go-detail iconfont makerarrow-right" @click="goTO('/center/cardVolume')"></i>
      </div>
      <div class="list-item">
        <i class="iconfont makerdizhi01 my-addr"></i>
        <span>收货地址</span>
        <i class="go-detail iconfont makerarrow-right" @click="goTO('/center/addressAdmin')"></i>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'MyCenter',
  methods: {
    goTO(path) {
      this.$router.push(path);
    },
  },
};
</script>

<style scoped lang="scss">
.my-center {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-self: start;
  align-items: center;
  .user-image {
    width: 30vw;
    height: 30vw;
    max-width: 110px;
    max-height: 110px;
    background-color: #ffffff;
    border-radius: 50%;
    margin-top: 40px;
    & > img {
      width: 100%;
      height: 100%;
    }
  }
  .user-name {
    height: 5vh;
    width: 100%;
    text-align: center;
    color: #1e1e1e;
    font-size: 16px;
    margin-top: 22px;
    font-weight: bold;
  }
  .my-list {
    margin-top: 3vh;
    .list-item {
      width: 90vw;
      height: 11vh;
      background-color: #ffffff;
      border-radius: 10px;
      display: flex;
      justify-self: start;
      align-items: center;
      padding: 0 10px;
      margin-bottom: 4vh;
      position: relative;
      .my-money {
        font-size: 26px;
        color: red;
        margin-right: 2vw;
      }
      .my-addr {
        font-size: 26px;
        color: green;
        margin-right: 2vw;
      }
      .go-detail {
        flex: 1;
        position: absolute;
        right: 20px;
        color: #ccc;
      }
      span {
        display: inline-block;
        max-width: 80vw;
        font-size: 16px;
        color: #1e1e1e;
        font-weight: bolder;
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
      }
    }
  }
}
</style>
